//根据身份证获取信息

jQuery(document).ready(function() {
    //员工身份证
    var zjhField = WfForm.convertFieldNameToId("zjh");
    var ygxmVal = WfForm.getFieldValue(zjhField);

    var ygbhid = WfForm.convertFieldNameToId("ygbh");
    WfForm.bindFieldChangeEvent(zjhField,
        function() {
            //alert("到这儿了");
            jQuery.ajax({
                async: false,
                type: 'GET',
                url: "/api/weavernorth/humanresource/getEmpInfo",
                data: {
                    "userid": ygxmVal
                },
                success: function(data) {
                    var data = JSON.parse(data);
                    WfForm.changeFieldValue(ygbhid, {
                        value: data.PERNR
                    });
                    WfForm.changeFieldValue(ygbhid, {
                        value: data.PERNR
                    });

                },
                error: function () {
                    alert("error!+!")
                }
            })
        }
    );
});